<header class="main-header">
    <a href="../../index2.html" class="logo" style="background-color: #222d32;color: #fff;border-right: none;border-bottom: 1px solid grey;">
        <span class="logo-mini">wolf</span>
        <span class="logo-lg"><b>狼途汽车门店管理平台</b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top" >
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
<#--                公告-->
                <li class="dropdown messages-menu">
                    <a  class="dropdown-toggle" data-toggle="dropdown" id="notice">
                        <script>
                            $('#notice').click(function () {
                                $.get("/notice/data",function () {

                                })
                            })
                        </script>
                        <i class="fa fa-envelope-o"></i>
                        <span class="label label-danger">${NOTICEMessage_IN_SESSION.total}</span>
                    </a>
                    <ul class="dropdown-menu">
                        <li class="header">你有${NOTICEMessage_IN_SESSION.total}条未读公告</li>
                        <li>
                            <ul class="menu" id="noticeAfter">
                                <#if NOTICEMessage_IN_SESSION.total !=0  >
                                    <#list NOTICEMessage_IN_SESSION.list as n>
                                        <li>
                                            <a href="#">
                                                <div class="pull-left">
                                                    <img src="/js/adminlte/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                                                </div>
                                                <h4>
                                                    ${USER_IN_SESSION.name}
                                                    时间${n.afterTime}
                                                    <small><i class="fa fa-clock-o"></i>
<#--                                                    如果时间差小于60就显示分钟-->
                                                      <#if n.afterTime < 60  >
                                                          ${n.afterTime}分钟
                                                      </#if>
<#--                                                        如果时间差大于等于60,小于420 分钟,则显示多少小时-->
                                                        <#if n.afterTime &gt;=60 && n.afterTime<1440 >
                                                            ${n.afterTime/60}小时
                                                        </#if>
                                                        <#if n.afterTime &gt;= 1440 && n.afterTime<10080>
                                                            ${n.afterTime/60/24}天
                                                        </#if>
                                                        <#if n.afterTime &gt;= 10080 >
                                                            7天
                                                        </#if>
                                                        </small>
                                                </h4>
                                                <p>${n.title}</p>
                                            </a>
                                        </li>
                                    </#list>
                                </#if>

                            </ul>
                        </li>
                        <li class="footer"><a href="/notice/list.ftl">查看更多公告</a></li>
                    </ul>
                </li>
<#--                公告的ajax-->
<#--                <script>-->
<#--&lt;#&ndash;                    定义一个变量控制传几个&ndash;&gt;-->
<#--                    var count = 0;-->
<#--                    $('#notice').click(function () {-->
<#--                        $.get("/notice/data",function (data) {-->

<#--                            console.log(data);-->
<#--                            $(data).each(function (index,ele) {-->
<#--                                console.log(ele.list)-->
<#--                                $('#noticeAfter').after(-->
<#--                                    -->
<#--                                )-->
<#--                            })-->


<#--                        })-->
<#--                    })-->
<#--                </script>-->


<#--                投票点入-->
                <li class="dropdown tasks-menu">
                    <a href="/activity/list" >
                        <i class="fa fa-flag-o"></i>
                    </a>
                </li>
<#--                系统信息点入-->
                <li class="dropdown notifications-menu">
                    <a href="/log/list" >
                        <i class="fa fa-bell-o"></i>
                    </a>
                </li>
<#--                个人设计-->
                <li>
                    <a href="#"  class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
                    <ul class="dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close" style="min-width: 100px;">
                        <li>
                            <a href="#">
                                <i class="fa fa-cog" ></i>
                                个人设置
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <i class=" fa fa-user"></i>
                                修改密码
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="/logout">
                                <i class="fa fa-power-off"></i>
                                注销
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</header>